Databases such as the Oracle Real Application Clusters (RAC) can be configured to support multi-tenancy. For example, a multi-tenant RAC database can provide a container database (CDB) that can host multiple separate pluggable databases (PDB). Each PDB can act as a self-contained, fully functional database, and includes information specific to the PDB itself. The clustered database supports the use of services, which can then be accessed by requesting applications, such as tenant applications.
In a multi-tenant environment which uses a clustered database, each service typically resides on a single database instance, which provides better performance. In some situations, a database administrator may want to relocate a service from one database instance to another database instance, at runtime and with minimal impact on a requesting application, e.g., a tenant application.
For example, a service may need to be relocated for provisioning purposes, when one or more database instances are added to a RAC system to accommodate an increased number of tenants, or when an existing database instance needs to be shut down for maintenance.
Typically, when a service is relocated, a connection pool, e.g., Oracle Universal Connection Pool (UCP), must close all its connections to an existing service immediately after the service is stopped on a source database instance, which may lead to a disconnect storm. Additionally, the connection pool cannot reestablish the connections to the service before the service comes back up on a different database instance, which may lead to a logon storm. These are the general areas that embodiments of the invention are intended to address.